import { PropType } from 'vue';

declare type TextType = 'text' | 'password' | 'textarea' | 'number';
declare type SizeType = 'large' | 'small' | 'middle';

export const inputProps = {
	name: {
		type: String,
	},
	value: {
		type: [String, Number],
	},
	disabled: {
		type: Boolean,
		default: false,
	},
	readOnly: {
		type: Boolean,
		default: false,
	},
	placeholder: {
		type: String,
	},
	type: {
		type: String as PropType<TextType>,
		default: 'text',
	},
	maxLength: {
		type: Number,
	},
	max: {
		type: Number,
	},
	min: {
		type: Number,
	},
	precision: {
		type: Number,
	},
	showMaxLength: {
		type: Boolean,
	},
	valueFormat: {
		type: String,
	},
	rows: {
		type: Number,
	},
	size: {
		type: String as PropType<SizeType>,
		default: 'middle',
	},
	unit: {
		type: String,
	},
	isDebounce: {
		type: Boolean,
		default: true,
	},
	visibilityToggle: {
		type: Boolean,
		default: true,
	},
	isTextArea10: {
		type: Boolean,
		default: false,
	},
};
